package com.freight.message.api;

import com.freight.common.core.constant.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "remoteMessageClient", value = ServiceNameConstants.MESSAGE_SERVICE)
public interface RemoteMessageClient {

    /**
     * 发送websocket通知公告消息（给所有客户端）
     * @return
     */
    @PostMapping(value = "/message/client/sendWsToAll-notice")
    void sendWsToAllNotice();

    /**
     * 发送websocket业务相关消息（给指定客户端）
     * @param userName
     * @return
     */
    @PostMapping(value = "/message/client/sendWsToOne-business")
    void sendWsToOneBusiness(@RequestParam("userName") String userName);

    /**
     * 发送企业微信通知
     * @param msg
     * @return
     */
    @PostMapping(value = "/message/client/sendWeChatMessage")
    void sendWeChatMessage(@RequestParam("msg") String msg);

}
